package com.sqm.sync_tool.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;

/**
 * <p>
 * 组织架构表
 * </p>
 *
 * @author sxubo
 * @since 2020-10-13
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("organization")
public class Organization extends Model<Organization> {

    private static final long serialVersionUID = 1L;

    /**
     * ID
     */
    @TableId(value = "organization_chart_id", type = IdType.ID_WORKER_STR)
    private String organizationChartId;

    /**
     * 组织名称
     */
    @TableField("organization_chart_name")
    private String organizationChartName;

    /**
     * 组织父级ID
     */
    @TableField("organization_chart_pid")
    private String organizationChartPid;

    /**
     * 顺序号
     */
    @TableField("order_num")
    private Integer orderNum;

    /**
     * 关联平台id
     */
    @TableField("info_id")
    private String infoId;

    /**
     * 主管ID
     */
    @TableField("master_id")
    private String masterId;

    /**
     * 主管name
     */
    @TableField("master_name")
    private String masterName;


    @Override
    protected Serializable pkVal() {
        return this.organizationChartId;
    }

}
